<div class="modal-overlay" onclick="closeModal()">
  <div class="player-modal" onclick="event.stopPropagation()">
    <div class="modal-header">
      <div class="header-title">玩家详细信息</div>
    </div>
    <div class="modal-body">
      <div class="player-main-info">
        <div class="player-info-section">
          <div class="player-header-info">
            <div class="player-avatar"></div>
            <div class="player-name">${playerName}</div>
            <div class="player-steamid">
              76561198123456789
              <button
                class="copy-btn-icon"
                onclick="copyToClipboard('76561198123456789')"
                title="复制SteamID"
              >
                <svg
                  width="14"
                  height="14"
                  viewBox="0 0 24 24"
                  fill="none"
                  stroke="currentColor"
                  stroke-width="2"
                >
                  <path
                    d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
                  ></path>
                  <rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>
                </svg>
              </button>
            </div>
          </div>

          <div class="info-grid">
            <div class="info-item">
              <div class="info-label">进入时间:</div>
              <div class="info-value">2023-06-15 11:30:45</div>
            </div>
            <div class="info-item">
              <div class="info-label">游戏总时长:</div>
              <div class="info-value">
                ${ Math.floor(Math.random() * 100) + 50 } 小时
              </div>
            </div>
            <div class="info-item">
              <div class="info-label">当局时长:</div>
              <div class="info-value">2小时15分钟</div>
            </div>
          </div>

          <div class="stats-grid">
            <div class="stat-item">
              <div class="stat-label">击杀</div>
              <div class="stat-value">3</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">死亡</div>
              <div class="stat-value">2</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">总K/D</div>
              <div class="stat-value">1.5</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">单位时间击杀</div>
              <div class="stat-value">1.3/min</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">救援</div>
              <div class="stat-value">1</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">平均存活时间</div>
              <div class="stat-value">2min/次</div>
            </div>
          </div>
        </div>

        <div class="killfeed-section">
          <div class="killfeed-controls">
            <div class="filter-btns">
              <button class="filter-btn active" data-filter="all">
                全部记录
              </button>
              <button class="filter-btn" data-filter="kills">击杀记录</button>
              <button class="filter-btn" data-filter="deaths">死亡记录</button>
              <button class="filter-btn" data-filter="other">其他记录</button>
            </div>
          </div>
          <div class="killfeed-list">
            <table class="killfeed-table">
              <thead>
                <tr>
                  <th width="80px">时间</th>
                  <th width="100px">玩家</th>
                  <th width="60px">动作</th>
                  <th width="100px">目标</th>
                  <th width="80px">伤害/分</th>
                  <th width="100px">武器/方式</th>
                </tr>
              </thead>
              <tbody>
                <tr class="kill">
                  <td>12:15:23</td>
                  <td>${playerName}</td>
                  <td>击杀</td>
                  <td>[RU]EnemyPlayer</td>
                  <td class="damage">87</td>
                  <td class="weapon">M4A1</td>
                </tr>
                <tr class="death">
                  <td>12:20:45</td>
                  <td>[RU]Sniper</td>
                  <td>击杀</td>
                  <td>${playerName}</td>
                  <td class="damage">100</td>
                  <td class="weapon">SVD</td>
                </tr>
                <tr class="construction">
                  <td>12:25:10</td>
                  <td>${playerName}</td>
                  <td>建造</td>
                  <td>沙袋工事</td>
                  <td class="damage">25</td>
                  <td class="weapon">工兵铲</td>
                </tr>
                <tr class="revive">
                  <td>12:30:22</td>
                  <td>${playerName}</td>
                  <td>救援</td>
                  <td>队友Alpha</td>
                  <td class="damage">50</td>
                  <td class="weapon">医疗包</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>

    <div class="modal-footer">
      <button
        class="footer-btn steam-btn"
        onclick="viewSteamProfile('76561198123456789')"
      >
        Steam资料
      </button>
      <button
        class="footer-btn switch-btn"
        onclick="switchTeam('${playerName}')"
      >
        切换阵营
      </button>
      <button class="footer-btn kick-btn" onclick="quickKick('${playerName}')">
        踢出
      </button>
      <button
        class="footer-btn warn-btn"
        onclick="showPenaltyDialog('${playerName}')"
      >
        处罚
      </button>
      <button
        class="footer-btn chat-btn"
        onclick="openChatWith('${playerName}')"
      >
        聊天
      </button>
    </div>
  </div>
</div>
